<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="css/contract.css" rel="stylesheet" type="text/css">
    <title>合同列表</title>
</head>
<body>
<!--header-->
<div class="top_box">
    <div id="" class="top">
        <div class="top_left">企业级视频直播解决方案</div>
        <div class="top_right"><a href="">关于我们&nbsp;&nbsp;</a>▏服务热线：400-048-2820</div>
        <div class="clearfix"></div>
    </div>

</div>
<div class="header_box">
    <div class="header">
        <div class="logo">
            <a href="#"><img src="images/logo1.png"></a>

        </div>
        <ul class="tab_menu">

        </ul>
        <div class="clearfix"></div>
    </div>
</div>

<!--main-->
<div class="main clearfix">
<a  href="loginOut" style="padding:8px 14px;background-color: #2d92dd;float: right;color: #fff;margin-top: 15px;margin-right: 15px;cursor: pointer;display: inline-block;">退出</a>
    <ul class="main_left">
    	 <li><a href="applyList">申请列表</a></li>
    	 <li><a  href="javascript:void(0)" style="color:#AEEEEE">合同列表</a></li>
       	 <li><a href="adminList">员工列表</a></li>
      
       
    </ul>
    <div class="add_find">
    <form action="contractList" method="post" id="form" style="display: inline-block;" >
        <input type="text"  name="firstPartyName" value="${ requestScope.firstPartyName}" placeholder="甲方名称"/>
        <button onclick="firstPartyName();">查询</button>
         </form>
     <button><a href="contractAdd" style="cursor:pointer ;text-decoration:none;color: #fff;">添加</a></button>
    
    </div>
      <div class="main_right">
        <label style="color:#AEEEEE">合同列表</label>
    <table>
        <thead>
            <tr>
               <th>甲方名称</th>
                <th>联系人</th>
                <th>电话</th>
                <th>合同金额</th>
                <th>销售人员</th>
                <th>合同开始时间</th>
                <th>合同结束时间</th>
                <th>是否支付</th>
                <th style="width: 80px;">操作</th>
            </tr>
             <c:forEach var="contract" items="${ requestScope.contractsList}"
							varStatus="st">
            <tr>
                <td>${contract.firstPartyName}</td>
                <td>${contract.contacts}</td>
                <td>${contract.telephone}</td>
                <td>${contract.contractAmount}元</td>
                <td>${contract.adminName}</td>
                <td>${contract.startTime}</td>
                <td>${contract.endTime}</td>
                <td><c:if test="${contract.whetherPay ==0 }">未支付</c:if>
                 <c:if test="${contract.whetherPay == 1}">已支付</c:if></td>
                <td><button class="gengxin"><a href="contractEdit?id=${ contract.id }" style="color: #fff;">修改</a></button></td>
            </tr>
            </c:forEach>
        </thead>
    </table>
    </div>
    <div class="clearfix"></div>
    <ul class="fenye clearfix">
        <li><a href="contractList?pageIndex=1&firstPartyName=${ requestScope.firstPartyName}">首页</a></li>
        <li><a href="contractList?pageIndex=${pageIndex-1}&firstPartyName=${ requestScope.firstPartyName}">上一页</a></li>
        <li><a style="color: #2d92dd">共有${totalCount}条记录，当前第${pageIndex}/${totalPage}页</a></li>
        <li><a <c:if test="${pageIndex < totalPage}"> href="contractList?pageIndex=${pageIndex+1}&firstPartyName=${ requestScope.firstPartyName}" </c:if>>下一页</a></li>
        <li><a href="contractList?pageIndex=${totalPage}&firstPartyName=${ requestScope.firstPartyName}">末页</a></li>
    </ul>
</div>
<div class="body-color"></div>
<!--foot-->
<div class="footer_box">
    <div class="footer">
        <p>Copyright@2016&nbsp;ZoomCloud&nbsp;众标科技,&nbsp; All&nbsp; right&nbsp; reserved.&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.miit.gov.cn" style="color: #8b97b1; text-decoration: none !important">皖ICP备16019558号</a> </p>
    </div>
</div>
<script src="js/jquery-1.7.2.js"></script>
<script type="text/javascript">
function firstPartyName(){
	$("#form").submit();
}
</script>
</body>
</html>